/* 1. BAT DAU: ARCGIS ------------------------------------------------- */

.esri-component.esri-zoom.esri-widget {
  display: none;
}

#id_thietkebando_group_timkiemdiadanh-input,
#id_matcatdiahinh_group_timkiemdiadanh-input {
  height: 38px;
  padding-left: 15px;
}

#id_thietkebando_group_timkiemdiadanh,
#id_matcatdiahinh_group_timkiemdiadanh {
  background-color: unset !important;
}

/* 1. KET THUC: ARCGIS ------------------------------------------------- */

/* ========================================================
   CUSTOM SEARCH BOX - Bộ tìm kiếm địa danh tự xây dựng
   ======================================================== */

/* Wrapper bao ngoài */
.custom-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 220px;
  height: 36px;
  background: #fff;
  border: 1.5px solid var(--page-color, #1ab394);
  border-radius: 20px;
  overflow: visible;
  z-index: 99999;
  position: relative;
}

.custom-search-wrapper:focus-within {
  box-shadow: 0 2px 10px rgba(26, 179, 148, 0.28);
  border-color: var(--page-color, #1ab394);
}

/* Icon kính lúp bên trái */
.custom-search-icon {
  position: absolute;
  left: 11px;
  font-size: 13px;
  color: var(--page-color, #1ab394);
  pointer-events: none;
  z-index: 1;
}

/* Input chính */
.custom-search-input {
  width: 100%;
  height: 100%;
  border: none !important;
  outline: none !important;
  background: transparent;
  font-size: 13px;
  color: var(--color-mauchu-chatgpt, #202123);
  padding-left: 32px;
  padding-right: 28px;
  border-radius: 20px;
  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.custom-search-input::placeholder {
  color: #777;
  font-size: 12.5px;
}

/* Nút xóa (X) */
.custom-search-clear {
  position: absolute;
  right: 10px;
  font-size: 13px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 2px 3px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
  user-select: none;
}

.custom-search-clear:hover {
  color: #555;
  background: #f0f0f0;
}

/* Dropdown kết quả */
.custom-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 270px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  z-index: 9999;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

/* Mỗi kết quả */
.custom-search-item {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 5px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--color-mauchu-chatgpt, #202123);
  line-height: 1.4;
  border-bottom: 1px solid #f3f3f3;
  transition: background 0.12s;
}

.custom-search-item:last-child {
  border-bottom: none;
}

.custom-search-item:hover {
  background: #f0faf7;
  color: var(--page-color, #1ab394);
}

.custom-search-item-img {
  flex-shrink: 0;
  width: 18px;
  height: 20px;
  object-fit: contain;
  margin-top: 0px;
}

.custom-search-item span {
  flex: 1;
  word-break: break-word;
}

/* Trạng thái loading / no result */
.custom-search-loading,
.custom-search-noresult {
  padding: 12px 14px;
  font-size: 12.5px;
  color: #555;
  text-align: center;
}

.custom-search-loading::before {
  content: "⏳ ";
}

/* Scrollbar đẹp cho dropdown */
.custom-search-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-search-dropdown::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}

.custom-search-dropdown::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* Badge nguồn dữ liệu (ArcGIS / OSM) */
.geocode-badge {
  font-size: 8px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 6px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  margin-left: 4px;
  vertical-align: middle;
}

.arcgis-badge {
  background: #e8f4fb;
  color: #0079c1;
  border: 1px solid #b3d9f0;
}

.osm-badge {
  background: #f0f9f0;
  color: #3d7a3d;
  border: 1px solid #b3ddb3;
}

/* ========================================================
   KET THUC: CUSTOM SEARCH BOX
   ======================================================== */


/* 2. BAT DAU: CAC NUT TREN BAN ARCGIS ------------------------------------------------- */
.view-map-btn-arcgis {
  border-radius: 5px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 30%);
  width: 40px;
  height: 40px;
  background: url("../img/ic_map_arcgis.png");
  border: 1px solid #454546;
  margin: 0 auto;
}

.view-satellite-btn-arcgis {
  border-radius: 5px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 30%);
  width: 40px;
  height: 40px;
  background: url("../img/ic_sal_arcgis.png");
  border: 1px solid #E8EAED;
  margin: 0 auto;
}

.optional-button-left-arcgis {
  position: absolute;
  top: 10px;
  left: 0px;
}

.optional-button-left-arcgis ul li {
  list-style-type: none;
  margin-top: 10px;
}

.optional-button-left-arcgis .current-location-button {
  border-radius: 50%;
  font-size: 20px;
  color: rgb(218, 70, 70);
  box-shadow: 0 2px 4px rgb(0 0 0 / 30%);
  width: 30px;
  height: 30px;
  padding-top: 1px;
  text-align: center;
  background: rgb(255, 255, 255);
  margin: 0 auto;
  cursor: pointer;
}

.optional-button-right-arcgis {
  display: flex;
  position: absolute;
  top: 70px;
  right: 0px;
}

.optional-button-right-arcgis ul li {
  list-style-type: none;
  margin-top: 10px;
}
